#https://missav.com/dm26/cn/miab-147-chinese-subtitle

import requests
url = "https://missav.com/dm26/cn/miab-147-chinese-subtitle"

# headers ={
# # "authority":"surrit.com",
# # "method":"GET",
# # "path":"/1fdd4fd6-2edc-4062-891c-987dadaca395/720p/video14.jpeg",
# "scheme":"https",
# "Accept":"*/*",
# "Accept-Encoding":"gzip, deflate, br, zstd",
# "Accept-Language":"zh-CN,zh;q=0.9",
# "Dnt":"1",
# "Origin":"https://missav.com",
# "Referer":"https://missav.com/dm26/cn/miab-147-chinese-subtitle",
# "Sec-Ch-Ua":'"Google Chrome";v="123", "Not":""A-Brand";v="8", "Chromium";v="123"',
# "Sec-Ch-Ua-Mobile":"?0",
# "Sec-Ch-Ua-Platform":"Windows",
# "Sec-Fetch-Dest":"empty",
# "Sec-Fetch-Mode":"cors",
# "Sec-Fetch-Site":"cross-site",
# "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36",
# }


res = requests.get(url=url)


print(res.status_code)

# with open(file="2.html",mode='w',encoding='utf8') as f:
#     f.write(res.text)
import chardet


result = chardet.detect(res.content) # 检测文件内容
print(result) # {'encoding': None, 'confidence': 0.0, 'language': None}



print(res.text)
print(res.encoding)



with open("3.html",'w',encoding='utf8') as f:
    f.write(res.text)

